package _interview100;

/**
 * 55. 跳跃游戏
 */
public class No55 {
    public boolean canJump(int[] nums) {
        for (int i = 0, step = 1; i < step + i; i++) {
            if (i == nums.length - 1) return true;
            step = Math.max(nums[i], --step);
        }
        return false;
    }
}